package biolabs.core;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks a method of a bio-object that handles the result of an action
 * (unary action or interaction) performed on this bio-object (that is
 * initiated by this bio-object).
 *
 * <p>Don't confuse with {@link OutcomeHandler}, which is used to
 * handle the interaction outcome for a participating bio-object.</p>
 *
 * <p>A bio-object may have more methods marked as {@code ResultHandler}s
 * of the same interaction. All of them will be called, in no particular
 * order, to handle the result of the corresponding interaction.</p>
 *
 * @author Tomas Mikula
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ResultHandler {
	Class<?>[] action();
	String[] typeParamRefs() default {};
}